﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="MessageBoard_List.aspx.cs" Inherits="TimKen.Web.Admin.MessageBoard.MessageBoard_List" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentLinkAction" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentTitle" runat="server">
    <%=GetLangString("MessageManage")%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentMain" runat="server">
    <div class="form-div">
        <img src="../images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
        <%=GetLangString("KeyWord")%>：<asp:TextBox ID="txtKeyWord" runat="server"></asp:TextBox>
        <%=GetLangString("CreateDate")%>：<asp:TextBox ID="txtCreateDateBegin" runat="server"
            onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'ctl00_ContentMain_txtCreateDateBegin\')}'})"></asp:TextBox>---
        <asp:TextBox ID="txtCreateDateEnd" runat="server" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'ctl00_ContentMain_txtCreateDateEnd\')}'})"></asp:TextBox>
        <asp:Button ID="btnSearch" runat="server" CssClass="button" OnClick="btnSearch_Click" />
    </div>
    <div class="list-div">
        <asp:GridView ID="grdMessageList" runat="server" AutoGenerateColumns="False" DataKeyNames="MessageID"
            OnRowCommand="grdMessageList_RowCommand" AllowSorting="True" CssClass="grid">
            <Columns>
                <asp:TemplateField>
                    <ItemStyle Width="350" />
                    <HeaderTemplate>
                        <%=GetLangString("Title")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("Title")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="50" />
                    <HeaderTemplate>
                        <%=GetLangString("UserName")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("UserName")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="50" />
                    <HeaderTemplate>
                        <%=GetLangString("Company")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("Company")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="80" />
                    <HeaderTemplate>
                        <%=GetLangString("CreateDate")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("CreateDate", "{0:yyyy-MM-dd}")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="80" />
                    <HeaderTemplate>
                        <%=GetLangString("IP")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("IP")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="80" />
                    <HeaderTemplate>
                        <%=GetLangString("IsDisplay")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:LinkButton ID="btnIsDisplay" runat="server" CommandArgument='<%#Eval("MessageID")%>'
                            CommandName="ChangeIsDisplay"><%#GetBoolPic(Boolean.Parse( Eval("IsDisplay").ToString()))%></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="80" HorizontalAlign="Center" />
                    <HeaderTemplate>
                        <%=GetLangString("Operation")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <a href='MessageBoard_View.aspx?MessageID=<%#DataBinder.Eval(Container.DataItem, "MessageID")%>'
                            title='<%#GetLangString("DetailInfo")%>'>
                            <img src="../images/icon_detail.gif" /></a>
                        <asp:ImageButton ID="btnDelete" runat="server" ToolTip='<%#GetLangString("Delete")%>'
                            CommandName="DeleteEvent" CommandArgument='<%#Eval("MessageID")%>' ImageUrl="~/Admin/images/icon_drop.gif"
                            OnClientClick="return deleteConfirm()" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <HeaderStyle HorizontalAlign="Center" />
        </asp:GridView>
        <div class="pager-div">
            <ux:AspNetPager ID="AspNetPager1" runat="server" Width="100%" ShowPageIndexBox="Always"
                HorizontalAlign="right" EnableTheming="true" AlwaysShow="true" PageIndexBoxType="DropDownList"
                OnPageChanged="AspNetPager1_PageChanged" ImagePath="/images/" NavigationButtonType="Image"
                ButtonImageNameExtension="n" CpiButtonImageNameExtension="r" PagingButtonType="Image">
            </ux:AspNetPager>
        </div>
    </div>
</asp:Content>
